/*
 * @Author: andy.dell andy@long.com
 * @Date: 2023-12-28 21:08:56
 * @LastEditors: andy.dell andy@long.com
 * @LastEditTime: 2024-01-09 20:42:43
 * @FilePath: \wasm\logic\snake\src\msg\GameData.go
 * @Description:
 */
package msg

import "com.game.snake/model"

type GameData struct {
	World   [][]*model.Cell // 地图
	Score   int             // 得分
	Level   int             // 等级:长度/5，障碍物数=等级*3
	IsEated bool            // 吃到了
	IsDead  bool            // 死了：要到自己、撞墙 或 撞到障碍物了
}

func NewGameData(world [][]*model.Cell, score, level int, eated, dead bool) GameData {
	return GameData{
		World:   world,
		Score:   score,
		Level:   level,
		IsEated: eated,
		IsDead:  dead,
	}
}
